
import Relay from "react-relay";
export default class GetPlanDetailMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { getPlanDetail }`;
    }

    getVariables() { 
        return {
            argsInput: {
                pageSize: this.props.pageSize,
                pageNum: this.props.pageNum,
                uid: this.props.uid,
                pdId: this.props.pdId,
            }
        }
    }

   getFatQuery() {
    return Relay.QL`fragment on getPlanDetailPayload {
            responseData {
                errorCode
                value
                totalResult
                id
                planDetailModelList{
                    materielType
                    orderType
                    productName
                    thisTimeCount
                    totalCount
                    remark
                    specification
                    needCount
                    varianceCount
                    ratio
                    planId
                    pdId
                    colour
                    imgUrl
                    prickle
                    planNeedCountModelList{
                        dosage
                        expend
                        needCount
                        sizeGroup
                        needCountId
                        planId
                        compactCount
                    
                    }
                }
            }
        }`;
}

getConfigs() {
    return [{
        type: 'REQUIRED_CHILDREN',
        children: [Relay.QL`
               fragment on getPlanDetailPayload  {
                    responseData {
                        errorCode
                        value
                        totalResult
                        id
                        planDetailModelList{
                            materielType
                            orderType
                            productName
                            thisTimeCount
                            totalCount
                            remark
                            specification
                            needCount
                            varianceCount
                            ratio
                            planId
                            pdId
                            colour
                            imgUrl
                            prickle
                            planNeedCountModelList{
                                dosage
                                expend
                                needCount
                                sizeGroup
                                needCountId
                                planId
                                compactCount
                            
                            }
                        }
                    }
                 }
            `]
    }];
}

}
